<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:head></h:head>
<h:body>

	<f:view>
		<h:form>
		<p:calendar></p:calendar>
		<p:inputText id="input"/>  
		<p:inputText id="input2"/>  
		<h:commandButton value="Novo" action="formulario" />
			<h:dataTable value="#{cadastroPessoasBean.listPessoa}" var="item">

				<h:column>
					<f:facet name="header">
						<h:outputText value="Codigo" />
					</f:facet>
					<h:outputText value="#{item.codigo}" />
				</h:column>

				<h:column>
					<f:facet name="header">
						<h:outputText value="Nome" />
					</f:facet>
					<h:outputText value="#{item.nome}" />
				</h:column>
				
				<h:column>
					<f:facet name="header">
						<h:outputText value="Opcoes" />
					</f:facet>
					<h:inputHidden value="#{item}" />
					<h:commandButton value="Alterar" action="#{cadastroPessoasBean.altera(item)}" />
					<h:commandButton value="Remover" action="#{cadastroPessoasBean.remover(item)}" />
				</h:column>
			</h:dataTable>
		</h:form>
	</f:view>
</h:body>
</html>
